<template>
  <div class="empty-container">
    <div class="empty-icon">
      <svg
        width="160"
        height="160"
        viewBox="0 0 160 160"
        fill="none"
        xmlns="http://www.w3.org/2000/svg"
      >
        <!-- 空状态图标 - 一个简单的盒子图标 -->
        <rect
          x="40"
          y="40"
          width="80"
          height="80"
          rx="8"
          stroke="#C0C4CC"
          stroke-width="2"
          fill="none"
        />
        <path
          d="M40 48L120 48"
          stroke="#C0C4CC"
          stroke-width="2"
        />
        <path
          d="M60 70L100 70"
          stroke="#C0C4CC"
          stroke-width="2"
          stroke-linecap="round"
        />
        <path
          d="M60 85L100 85"
          stroke="#C0C4CC"
          stroke-width="2"
          stroke-linecap="round"
        />
        <path
          d="M60 100L90 100"
          stroke="#C0C4CC"
          stroke-width="2"
          stroke-linecap="round"
        />
      </svg>
    </div>

    <div v-if="description" class="empty-description">
      {{ description }}
    </div>

    <div v-if="$slots.default" class="empty-content">
      <slot />
    </div>
  </div>
</template>

<script setup lang="ts">
interface Props {
  description?: string
}

withDefaults(defineProps<Props>(), {
  description: ''
})
</script>

<style scoped>
.empty-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.empty-icon {
  color: #C0C4CC;
}

.empty-description {
  font-size: 14px;
  color: #909399;
  line-height: 1.5;
  margin-bottom: 16px;
}

.empty-content {
  margin-top: 8px;
}
</style>
